package com.springcloud.tools.entity;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * @author fuc
 * @create 2020-06-12
 */
@Document(indexName = "content", type = "doc")
@Data
public class User {

  @Id private String id;

  @Field(type = FieldType.Text)
  private String name;

  @Field(type = FieldType.Integer)
  private Integer age;
}
